package com.service;

import com.dao.RentMapper;
import com.pojo.Rent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RentServiceImpl implements RentService{

    @Autowired
    private RentMapper rentMapper;

    @Override
    public List<Rent> list() {
        List list = rentMapper.list();
        return list;
    }

    @Override
    public int add(Rent rent) {
        int result = rentMapper.add(rent);
        return result;
    }

    @Override
    public int update(int id) {
        return rentMapper.update(id);
    }

    @Override
    public List<Rent> findlist(String carNum) {
        return rentMapper.findlist(carNum);
    }
}
